<template>
  <div id="app">
    <img src="./assets/logo.png" />
        <div>
			<router-link style="margin:5px;" v-for="nav in navs" :key="nav.id" to>{{nav.name}}</router-link>
		</div>
    <hr />
    <div>
      <router-link to="/">首页</router-link>
    </div>
    <router-view />
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      navs: []
    };
  },
  mounted() {
    //导航
    this.$axios
      .get("http://39.107.239.131/Tencent/public/index.php/index/index/nav")
      .then(res => {
        console.log(res);
        this.navs = res.data.data;
      });
  }
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
